﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:local="clr-namespace:PhoneInfo"
     xmlns:delay="clr-namespace:Delay;assembly=PhonePerformance" xmlns:controlsPrimitives="clr-namespace:Microsoft.Phone.Controls.Primitives;assembly=Microsoft.Phone.Controls" 
    x:Class="PhoneInfo.Page.ShrewdEye" Style="{StaticResource TransitionPageStyle}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="800" d:DesignWidth="480"
    shell:SystemTray.IsVisible="false"
    >
    <phone:PhoneApplicationPage.Resources>
        <shell:ApplicationBar x:Key="AppBar" ForegroundColor="#ffffffff" BackgroundColor="#ff31b2e7" >
            <shell:ApplicationBarIconButton  IconUri="Icon/info/i_refresh.png" Text="刷新" Click="refresh" />
        </shell:ApplicationBar>
        <shell:ApplicationBar x:Key="AppBar1" ForegroundColor="#ffffffff" BackgroundColor="#212121" >
            <shell:ApplicationBarIconButton  IconUri="Icon/black/i_refresh.png" Text="刷新" Click="refresh" />
        </shell:ApplicationBar>
        <local:FixEmptyUrl x:Key="FixUrl"/>
        <local:BoolToVis x:Key="BoolToVis"/>
        <local:stringTosubstr x:Key="stringTosubstr"/>
        <Style x:Key="PivotStyle1" TargetType="controls:Pivot">
        	<Setter Property="Margin" Value="0"/>
        	<Setter Property="Padding" Value="0"/>
        	<Setter Property="Foreground" Value="{StaticResource PhoneForegroundBrush}"/>
        	<Setter Property="Background" Value="Transparent"/>
        	<Setter Property="ItemsPanel">
        		<Setter.Value>
        			<ItemsPanelTemplate>
        				<Grid/>
        			</ItemsPanelTemplate>
        		</Setter.Value>
        	</Setter>
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="controls:Pivot">
        				<Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
        					<Grid.RowDefinitions>
        						<RowDefinition Height="Auto"/>
        						<RowDefinition Height="Auto"/>
        						<RowDefinition Height="*"/>
        					</Grid.RowDefinitions>
        					<Grid Background="{TemplateBinding Background}" CacheMode="BitmapCache" Grid.RowSpan="3"/>
        					<ContentPresenter ContentTemplate="{TemplateBinding TitleTemplate}" Content="{TemplateBinding Title}" Margin="24,17,0,-7"/>
        					<ItemsPresenter x:Name="PivotItemPresenter" Margin="{TemplateBinding Padding}" Grid.Row="2"/>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
    </phone:PhoneApplicationPage.Resources>
	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>
    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Grid x:Name="LayoutRoot" Background="{Binding Source={StaticResource Theme}, Path=cuTheme.TextBrush}" Tap="LayoutRoot_Tap" Loaded="LayoutRoot_Loaded">
        <toolkit:PerformanceProgressBar   Foreground="Orange" x:Name="ProgBar" IsIndeterminate="True" Height="10" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0" Grid.ColumnSpan="2"  Width="480" />
        <controls:Pivot x:Name="pivot"   Height="688"  HorizontalAlignment="Left" Margin="0,10,0,0" SelectedIndex="0"   VerticalAlignment="Top" Width="480" ItemsSource="{Binding ShrewdEyeItemS}" Style="{StaticResource PivotStyle1}" BorderThickness="0" >
            <controls:Pivot.Title>
                <TextBlock Text="精明眼"  Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.TitleBrush}"  FontSize="50"/>
            </controls:Pivot.Title>
               <controls:Pivot.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <Image delay:LowProfileImageLoader.UriSource="{Binding Picurl, Converter={StaticResource FixUrl}}" Margin="0,30,0,10" Width="480" Height="300" Stretch="Fill"/>
                        <TextBlock  Text="{Binding Title}" TextWrapping="Wrap"  Margin="0,50,0,0" 
                                    Foreground="{Binding Source={StaticResource Theme}, Path=cuTheme.SecondTextBrush}" 
                                    FontSize="26"  VerticalAlignment="Center" HorizontalAlignment="Center"/>
                        <TextBlock  Text="{Binding Content}" Foreground="#ff535353"
                                    TextWrapping="Wrap"  Margin="0,20,0,0" FontSize="20"  VerticalAlignment="Top" HorizontalAlignment="Left"/>
                        <Image Margin="330,30,0,0"  Source="/Icon/info/eye.png" HorizontalAlignment="Left" VerticalAlignment="Top" Stretch="None"/>
                    </StackPanel>
                </DataTemplate>
            </controls:Pivot.ItemTemplate>
        </controls:Pivot>
        <local:PivotLocationView x:Name="PivotLocationView"
                             VerticalAlignment="Bottom"
                             Margin="2,0" Height="55" RenderTransformOrigin="0.5,0.5">
        	<local:PivotLocationView.RenderTransform>
        		<CompositeTransform ScaleY="-1"/>
        	</local:PivotLocationView.RenderTransform>
        </local:PivotLocationView>
    </Grid>
</phone:PhoneApplicationPage>
